package com.janko.util;

/**
 * @Author nyk
 * @Date 2023/1/31 17:06
 * @Version 1.0
 * @Desc 泛型工具类
 */
public class Person<T> {
    T t;

    public Person(){}

    public Person(T t) {
        this.t = t;
    }

    public void show() {
        System.out.println(t.getClass());
    }

    public static void main(String[] args) {
        Person<String> stringPerson = new Person<>("好人");
        stringPerson.show();
        Person<Integer> integerPerson = new Person<>(123);
        integerPerson.show();
    }
}

